﻿package frEngine.multiThread
{
    import com.gengine.resource.mutiThread.*;
    import flash.net.*;
    import frEngine.animateControler.particleControler.*;
    import frEngine.multiThread.proxy.*;
    import frEngine.multiThread.vo.*;

    public class F3DThreadManager extends ThreadManager
    {

        public function F3DThreadManager()
        {
            return;
        }// end function

        override protected function initRegistClass() : void
        {
            super.initRegistClass();
            registerClassAlias("AgalVo", AgalVo);
            registerClassAlias("ParticleParams", ParticleParams);
            registerClassAlias("XYZObject", XYZObject);
            return;
        }// end function

        override protected function handleMainMessage(param1:Object) : void
        {
            switch(param1.transType)
            {
                case ThreadTransType.AgalBuild:
                {
                    ThreadImpDoingHelp.instance.doingAgal(param1);
                    break;
                }
                case ThreadTransType.ParserParticle:
                {
                    ThreadParserParticle.instance.doing(param1);
                    break;
                }
                case ThreadTransType.StartSecondThreadTest:
                {
                    sendMessageToMain(param1, null, false);
                    break;
                }
                default:
                {
                    break;
                }
            }
            super.handleMainMessage(param1);
            return;
        }// end function

        public static function get instance() : F3DThreadManager
        {
            if (_instance == null)
            {
                _instance = new F3DThreadManager;
            }
            return F3DThreadManager.F3DThreadManager(_instance);
        }// end function

    }
}
